#include <glf/config.h>
#include <glf/math/functions_detail_.h>

namespace glf {

template<typename T>
inline T DegToRad(T x) {
	return math_detail::DegToRad(x);
}

template<typename T>
inline T RadToDeg(T x) {
	return math_detail::RadToDeg(x);
}

template<typename T>
inline T Sin(T x) {
	return math_detail::Sin(x);
}

template<typename T>
inline T Cos(T x) {
	return math_detail::Cos(x);
}

template<typename T>
inline T Tan(T x) {
	return math_detail::Tan(x);
}

template<typename T>
inline T Acos(T x) {
	return math_detail::Acos(x);
}

template<typename T>
inline T SafeAcos(T x) {
	return math_detail::SafeAcos(x);
}

template<typename T>
inline T Asin(T x) {
	return math_detail::Asin(x);
}

template<typename T>
inline T SafeAsin(T x) {
	return math_detail::SafeAsin(x);
}

template<typename T>
inline T Atan(T x) {
	return math_detail::Atan(x);
}

template<typename T>
inline T Atan2(T y, T x) {
	return math_detail::Atan2(y, x);
}

template<typename T>
inline T Sqrt(T x) {
	return math_detail::Sqrt(x);
}

template<typename T>
inline T Fmod(T x, T y) {
	return math_detail::Fmod(x, y);
}

template<typename T>
inline T Ceil(T x) {
	return math_detail::Ceil(x);
}

template<typename T>
inline T Floor(T x) {
	return math_detail::Floor(x);
}

// Note: Log(float) and Log(double) must not be merge with a template due to
// forward declare and reuse in math_detail::Log10

inline float Log(float x) {
	return math_detail::Log(x);
}

inline double Log(double x) {
	return math_detail::Log(x);
}

template<typename T>
inline T Log10(T x) {
	return math_detail::Log10(x);
}

} //namespace glf
